﻿using System.Web.Mvc;

namespace VladanStrigoNET.Samples.Blogged.Routes
{
    public class RouteContainer
    {
        public static void Initialize(RouteCollection routes)
        {
            routes.Add(new Route
            {
                Url = "[controller]/[action]",
                RouteHandler = typeof(MvcRouteHandler)
            });

            routes.Add(new Route
            {
                Url = "[controller]/[action]/[id]",
                RouteHandler = typeof(MvcRouteHandler)
            });

            routes.Add(new Route
            {
                Url = "Blog",
                Defaults = new { controller = "Blog", action = "ShowPosts" },
                RouteHandler = typeof(MvcRouteHandler)
            });

            routes.Add(new Route
            {
                Url = "Default.aspx",
                Defaults = new { controller = "Blog", action = "ShowPosts" },
                RouteHandler = typeof(MvcRouteHandler)
            });

        }
    }
}
